﻿using System;
using SocialShare.BusinessLogicLayer;
using SocialShare.BusinessEntities;
using SocialShare.DAL.Facades;

public partial class controls_ViewCMS : System.Web.UI.UserControl
{
    String _cmsType = string.Empty;
    public String CmsType
    {
        get
        {
            return _cmsType;
        }
        set
        {
            _cmsType = value;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SiteContentFacade cmsFacade = new SiteContentFacade();
            SocailShare_Site_Contents cms = cmsFacade.GetSite_ContentsByCmsType(CmsType);
            if (cms != null)
            {
                    litCmsContent.Text = Server.HtmlDecode(cms.CmsContent);
            }
        }
    }
}